Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A simple Json implementation for future use. #4708

Merged
merged 2 commits into from
Jul 30, 2019

Conversation

trivialfis
Copy link
Member

@trivialfis trivialfis commented Jul 25, 2019

This will enable #4702 and #4683 (extracted from there). Other than serialization, the JSon implementation will be used to consume numpy array interface, and cuda array interface. This will benefit XGBoost as creating the generic interface will enable introp with lots of existing libraries (arrow and friends, cupy, numba etc..) without creating specific C backend source code.

A json implementation will the first part of on going effort for above described features. This PR doesn't touch any existing code base, can we consider merging it although it's not used by other code?

@trivialfis
Copy link
Member Author

@rongou @sriramch Please help reviewing.

Copy link
Contributor

@trams trams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an extraction of json parser from #4683 ?

src/common/json.cc Show resolved Hide resolved
src/common/json.cc Show resolved Hide resolved
include/xgboost/json.h Show resolved Hide resolved
@trivialfis
Copy link
Member Author

trivialfis commented Jul 26, 2019

@trams Yes. I need to split that PR into a few dependent PRs. I will address your comment from that PR here. :-). Thanks.

Copy link
Member

@RAMitchell RAMitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM in general.

Some questions:

  • Why specialize the file reader based on os?
  • How is this implementation different from that provided by dmlc
  • Why is the use of friend classes necessary? (I always ask this question as friend classes commonly indicate a shortcut instead or proper oo design)

@trivialfis
Copy link
Member Author

@RAMitchell Removed the friend class.

@trivialfis
Copy link
Member Author

Since it doesn't modify existing code base, I incline to merge it here with all related comments addressed as now I'm working on the cudf intergration which will make use of this Json implementation. Any objection? @hcho3 @CodingCat

@trivialfis trivialfis merged commit d2e1e4d into dmlc:master Jul 30, 2019
@trivialfis trivialfis mentioned this pull request Aug 8, 2019
10 tasks
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
@trivialfis trivialfis deleted the json-impl branch December 23, 2019 12:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants